<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>层次选择器</title>
    <style>
        
        .container {
            
            width: 600px;
            height: 600px;
            border: 1px solid;
        }
        
        /*后代选择器*/
        .container .row{
             border: 1px solid;
         }

        /*子元素选择器*/
        .row >.col{
            color: #ff3451;
        }
        
    </style>
</head>
<body>
<div class="container">

    <div class="row">
        <div class="col">

            1
        </div>
    </div>

    <div class="row">
        <div class="box">
            <div class="col">
                2
            </div>
        </div>

    </div>
</div>
</body>
</html>